1 <?php
2     
3     session_start();
4     require
"admin/includes/functions.php";
5     require
"admin/includes/db.php";
6     
7     $bfast =
"";
8     $lunch =
"";
9     $dinner =
"";
10     $special =
"";
11     
12     $get_recent = $db->query(
"SELECT * FROM food");
13     
14     
if($get_recent->num_rows) {
15         
16         
while($row = $get_recent->fetch_assoc()) {
17             
18             
if($row['food_category'] == "breakfast") {
19                 
20                 $bfast .=
"<div class='parallax_item'>
21                 
22                             <a href='detail.php?fid="
.$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
23                             <div
class='detail'>
24                                 
25                                 <h4>"
.$row['food_name']."</h4>
26                                 <p
class='desc'>".substr($row['food_description'], 0, 33)."...</p>
27                                 <p
class='price'>#".$row['food_price']."</p>
28                                 
29                             </div>
30                             <p
class='clear'></p>
31                             </a>
32                             
33                         </div>"
;
34                 
35             }elseif($row[
'food_category'] == "lunch") {
36                 
37                 $lunch .=
"<div class='parallax_item'>
38                 
39                             <a href='detail.php?fid="
.$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
40                             <div
class='detail'>
41                                 
42                                 <h4>"
.$row['food_name']."</h4>
43                                 <p
class='desc'>".substr($row['food_description'], 0, 33)."...</p>
44                                 <p
class='price'>#".$row['food_price']."</p>
45                                 
46                             </div>
47                             <p
class='clear'></p>
48                             </a>
49                             
50                         </div>"
;
51                 
52             }elseif($row[
'food_category'] == "dinner") {
53                 
54                 $dinner .=
"<div class='parallax_item'>
55                 
56                             <a href='detail.php?fid="
.$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
57                             <div
class='detail'>
58                                 
59                                 <h4>"
.$row['food_name']."</h4>
60                                 <p
class='desc'>".substr($row['food_description'], 0, 33)."...</p>
61                                 <p
class='price'>#".$row['food_price']."</p>
62                                 
63                             </div>
64                             <p
class='clear'></p>
65                             </a>
66                             
67                         </div>"
;
68                 
69             }elseif($row[
'food_category'] == "special") {
70                 
71                 $special .=
"<div class='parallax_item'>
72                 
73                             <a href='detail.php?fid="
.$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
74                             <div
class='detail'>
75                                 
76                                 <h4>"
.$row['food_name']."</h4>
77                                 <p
class='desc'>".substr($row['food_description'], 0, 33)."...</p>
78                                 <p
class='price'>#".$row['food_price']."</p>
79                                 
80                             </div>
81                             <p
class='clear'></p>
82                             </a>
83                             
84                         </div>"
;
85                 
86             }
87             
88         }
89         
90     }
else{
91         
92         
93         
94     }
95     
96 ?>
97
98 <!Doctype html>
99
100 <html lang=
"en">
101 <meta charset=
"utf-8" />
102 <meta http-equiv=
"X-UA-Compatible" content="IE=edge,chrome=1" />
103 <meta name=
"viewport" content="width=device-width, initial-scale=1.0" />
104
105 <meta name=
"description" content="" />
106
107 <meta name=
"keywords" content="" />
108
109 <head>
110     
111 <title>MFORS</title>
112
113 <link rel=
"stylesheet" href="css/main.css" />
114
115 <script src=
"js/jquery.min.js" ></script>
116
117 <script src=
"js/myscript.js"></script>
118     
119 </head>
120
121 <body>
122     
123 <?php require
"includes/header.php"; ?>
124
125 <div
class="parallax" onclick="remove_class()">
126     
127     <div
class="parallax_head">
128         
129         <h2>Khám Phá</h2>
130         <h3>Thực Đơn</h3>
131         
132     </div>
133     
134 </div>
135
136 <div
class="content" onclick="remove_class()">
137     
138     <div
class="inner_content on_parallax">
139         
140         <h2><span
class="fresh">Trà sữa trân châu trắng</span></h2>
141         
142         <div
class="parallax_content">
143             
144             <?php echo ($bfast ==
"") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $bfast; ?>
145             
146             <p
class="clear"></p>
147             
148         </div>
149         
150     </div>
151     
152 </div>
153
154 <div
class="content" onclick="remove_class()">
155     
156     <div
class="inner_content on_parallax">
157         
158         <h2><span
class="fresh">Trà sữa Oreo Cake Cream</span></h2>
159         
160         <div
class="parallax_content">
161             
162             <?php echo ($lunch ==
"") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $lunch; ?>
163             
164             <p
class="clear"></p>
165             
166         </div>
167         
168     </div>
169     
170 </div>
171
172 <div
class="content" onclick="remove_class()">
173     
174     <div
class="inner_content on_parallax">
175         
176         <h2><span
class="fresh">Trà xoài kem cheese</span></h2>
177         
178         <div
class="parallax_content">
179             
180             <?php echo ($dinner ==
"") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $dinner; ?>
181             
182             <p
class="clear"></p>
183             
184         </div>
185         
186     </div>
187     
188 </div>
189
190 <div
class="content" onclick="remove_class()">
191     
192     <div
class="inner_content on_parallax">
193         
194         <h2><span
class="fresh">Trà sữa khoai môn</span></h2>
195         
196         <div
class="parallax_content">
197             
198             <?php echo ($special ==
"") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $special; ?>
199             
200             <p
class="clear"></p>
201             
202         </div>
203         
204     </div>
205     
206 </div>
207
208 <div
class="footer_parallax" onclick="remove_class()">
209     
210     <div
class="on_footer_parallax">
211         
212         <p>&copy; <?php echo strftime(
"%Y", time()); ?> <span></span>.Trà Sữa Hương Vị Thơm - Chuẩn Vị Ngon - Khơi Nguồn Cảm Hứng</p>
213         
214     </div>
215     
216 </div>
217     
218 </body>
219
220 </html>


Gõ tìm kiếm nhanh...